package cn.whpu.ui;

import cn.whpu.factory.BeanFactory;
import cn.whpu.service.AccountService;
import cn.whpu.service.impl.AccountServiceImpl;

/**
 * 模拟一个表现层，调用业务层
 */
public class Client {
    public static void main(String[] args) {
//        AccountService as =new AccountServiceImpl();
        for (int i = 0; i < 5; i++) {
            AccountService as = (AccountService)BeanFactory.getBean("accountService");
            System.out.println(as);
            as.saveAccount();
        }
    }
}
